

import React from "react";

import LoginPage from "@/PageCompnents/Login";
import RegisterPage from "@/PageCompnents/Register";
import LayoutContainer from "./Components/Layout";

function PageWrapper({ actKey, login, register, header, menu, banner, home, bread, list, detail, newslist, newsdetail, forumlist, forumdetail, add, center }) {

  switch (actKey) {
    case 'login':
      return <LoginPage base={login.base} />

    case 'register':
      return <RegisterPage register={register} />

    default:
      return <LayoutContainer
        actKey={actKey}
        header={header}
        menu={menu}
        banner={banner}
        home={home}
        bread={bread}
        list={list}
        detail={detail}
        newslist={newslist}
        newsdetail={newsdetail}
        forumlist={forumlist}
        forumdetail={forumdetail}
        add={add}
        center={center}
      />
  }

}

export default React.memo(PageWrapper) 